package com.iflytek.document;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
@Document(indexName = "cart_info")
public class CartDocument {
    @Id
    @ApiModelProperty(value = "序号,新增不传",example="1")
    private Long id;

    @Field(name = "goodsId", type = FieldType.Long)
    @ApiModelProperty(value = "商品id",example="1")
    private Long goodsId;

    @Field(name = "userId", type = FieldType.Long)
    @ApiModelProperty(value = "用户id",example="1")
    private Long userId;

    @Field(name = "count", type = FieldType.Integer)
    @ApiModelProperty(value = "商品数量",example="1")
    private Integer count;

    @Field(name = "createTime", type = FieldType.Date)
    @ApiModelProperty(value = "加入时间")
    private String createTime;
}
